home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / raytrace / rayshade / graphtal.lzh / Graphtal.Amiga / Cone.h < prev    next >
C/C++ Source or Header  |  1992-11-19  |  1KB  |  51 lines

  1. /*
  2.  * Cone.h  - class definition for geometric object cone.
  3.  *
  4.  * Copyright (C) 1992, Christoph Streit (streit@iam.unibe.ch)
  5.  *                     University of Berne, Switzerland
  6.  * Copyright (C) 1989, 1991, Craig E. Kolb
  7.  * All rights reserved.
  8.  *
  9.  * This software may be freely copied, modified, and redistributed
  10.  * provided that this copyright notice is preserved on all copies.
  11.  *
  12.  * You may not distribute this software, in whole or in part, as part of
  13.  * any commercial product without the express consent of the authors.
  14.  *
  15.  * There is no warranty or other guarantee of fitness of this software
  16.  * for any purpose.  It is provided solely "as is".
  17.  *
  18.  */
  19.  
  20. #ifndef Cone_H
  21. # define Cone_H
  22.  
  23. #include "GeoObject.h"
  24. #include "Polygon.h"
  25.  
  26. //___________________________________________________________ Cone
  27.  
  28. class Cone : public GeoObject 
  29. {
  30. public:
  31.   static GeoObject* create(real, const Vector&, real, const Vector&);
  32.  
  33.   int intersect(const Ray&, real, real&);
  34.   Vector normal(const Vector&) const;
  35.   PolygonList* tesselate(const BoundingBox&);
  36.  
  37.   int setTransform(TransMatrix*);
  38.   
  39. private:
  40.   Cone(real, const Vector&, real, const Vector&);
  41.  
  42. private:
  43.   /*
  44.    * startDistance is the distance from the origin of the canonical
  45.    * cone at which the cone begins
  46.    */
  47.   real startDistance;
  48. };
  49.  
  50. #endif // Cone_H
  51.